package com.byt.framlib.commonwidget.finder.addresslistfinder;

import com.byt.framlib.commonwidget.finder.entity.City;
import com.byt.framlib.commonwidget.finder.entity.County;
import com.byt.framlib.commonwidget.finder.entity.Province;
import com.byt.framlib.commonwidget.finder.entity.Street;

import java.util.List;

public interface AddressProvider {

    void provideProvinces(AddressReceiver<Province> addressReceiver);

    void provideCitiesWith(Province province, AddressReceiver<City> addressReceiver);

    void provideCountiesWith(City city, AddressReceiver<County> addressReceiver);

    void provideStreetsWith(County county, AddressReceiver<Street> addressReceiver);

    interface AddressReceiver<T> {
        void send(List<T> data);
    }
}